#!/bin/sh
# Script for running KDEnlive built by kdenlive_builder.sh.
#
# * Takes care of setting LD_LIBRARY_PATH
# * Turns on linker debugging so you can check what libraries are actually used
# * Saves a log of console output to a log file in build directory
#
# Set default DEST_DIR in the source, otherwise ~/build/kdenlive is used by default.
#
# Usage:
# kdenlive_launcher.sh - run KDEnlive from the default directory contained in DEST_DIR
# kdenlive_launcher.sh OTHER_DEST_DIR - run KDEnlive from the given build directory
#
# Aleksander Adamowski (Olo)
# $Id: kdenlive_launcher.sh 36 2007-07-20 22:58:10Z aleksander.adamowski $
#


if [ -n "$1" ]; then
	DEST_DIR="$(dirname $1)/$(basename $1)"
else
	DEST_DIR=~/build/kdenlive
fi

echo "DEST_DIR: $DEST_DIR"
export PATH="$DEST_DIR/bin:$PATH"
echo "PATH: $PATH"
export LD_LIBRARY_PATH=$DEST_DIR/lib
echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH"
export LD_DEBUG=libs
$DEST_DIR/bin/kdenlive --nocrashhandler 2>&1 | tee -a $DEST_DIR/$(date +%F_%H_%M_%S)_log.txt

# Changelog:
# v1.0 - 16.6.2007
# SVN revision 3 - 2007-07-07
# import into SVN on Google project hosting

